package com.cdks.wuxiu.api.service;

import lombok.extern.slf4j.Slf4j;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cdks.wuxiu.api.service.mongo.SystemParamConfigService;
import com.cdks.wuxiu.api.service.mysql.AppBannerConfigService;
import com.cdks.wuxiu.api.service.mysql.AppVersionConfigService;
import com.cdks.wuxiu.api.service.mysql.FeedbackInfoService;
import com.cdks.wuxiu.entity.mongodb.SystemParamConfig;
import com.cdks.wuxiu.entity.mysql.AppBannerConfig;
import com.cdks.wuxiu.entity.mysql.AppVersionConfig;
import com.cdks.wuxiu.entity.mysql.FeedbackInfo;


@Slf4j
@Service
public class SystemServiceImpl implements SystemService {
    @Resource
    private SystemParamConfigService systemParamConfigService;
    @Resource
    private AppVersionConfigService appVersionConfigService;
    @Resource
    private AppBannerConfigService appBannerConfigService;
    @Resource
    private FeedbackInfoService feedbackInfoService;


    @Override
    public SystemParamConfig getSystemParams() {
        return systemParamConfigService.getParams();
    }

    @Override
    public AppVersionConfig getVersionByBranch(int branch) {
        return appVersionConfigService.getVersionByBranch(branch);
    }

    @Override
    public List<AppBannerConfig> getBannerByPlat(int plat) {
        return appBannerConfigService.getBannerByPlat(plat);
    }

    @Override
    public int saveFeedBack(FeedbackInfo feedback) {
        feedbackInfoService.save(feedback);

        return 0;
    }
}
